package com.ruoyi.commodity.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 质检模板图片表
 * @TableName tb_quality_template_images
 */
@TableName(value ="tb_quality_template_images")
@Data
public class QualityTemplateImages implements Serializable {
    /**
     * 质检模板图片id
     */
    @TableId(value = "template_image_id", type = IdType.AUTO)
    private Long templateImageId;

    /**
     * 关联质检模板id
     */
    @TableField(value = "template_id")
    private Long templateId;

    /**
     * 质检模板图片路径
     */
    @TableField(value = "template_image_path")
    private String templateImagePath;

    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    private Date createdTime;

    /**
     * 修改时间
     */
    @TableField(value = "updated_time")
    private Date updatedTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        QualityTemplateImages other = (QualityTemplateImages) that;
        return (this.getTemplateImageId() == null ? other.getTemplateImageId() == null : this.getTemplateImageId().equals(other.getTemplateImageId()))
            && (this.getTemplateId() == null ? other.getTemplateId() == null : this.getTemplateId().equals(other.getTemplateId()))
            && (this.getTemplateImagePath() == null ? other.getTemplateImagePath() == null : this.getTemplateImagePath().equals(other.getTemplateImagePath()))
            && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()))
            && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTemplateImageId() == null) ? 0 : getTemplateImageId().hashCode());
        result = prime * result + ((getTemplateId() == null) ? 0 : getTemplateId().hashCode());
        result = prime * result + ((getTemplateImagePath() == null) ? 0 : getTemplateImagePath().hashCode());
        result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
        result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", templateImageId=").append(templateImageId);
        sb.append(", templateId=").append(templateId);
        sb.append(", templateImagePath=").append(templateImagePath);
        sb.append(", createdTime=").append(createdTime);
        sb.append(", updatedTime=").append(updatedTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}